﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AllMaintenance.aspx.cs" Inherits="MaintenanceMgm_AllMaintenance" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>固定资产维修</title>
    <link href="../Style/MyWork.css" rel="stylesheet" />
    <style>
        /* 侧边栏样式 */
        .menus {
            list-style: none;
            padding: 0;
            margin: 0;
            transition: left 0.5s; /* 动画效果 */
            position: absolute;
            top: 100px;
            left: -200px; /* 默认隐藏 */
            bottom: 0;
            overflow-y: auto;
            float: left;
            width: 200px;
            height: 650px;
            background-color: coral;
            border-radius: 11px;
        }

            .menus li {
                padding: 3px;
            }

            .menus a {
                text-decoration: none;
                display: block;
                padding: 8px 16px;
                color: black;
            }

                .menus a:hover {
                    background-color: #555;
                    color: white;
                }
        /* 图片按钮样式 */
        .menu-toggle {
            cursor: grab;
            float: left;
        }

        .button3 {
            position: absolute;
            top: 12%;
            left: 26%;
        }

        .list {
            text-decoration: none;
        }
        /*返回按钮样式*/
        .returnbutton {
            position: absolute;
            top: 15%;
            left: 25%;
        }
        /*表格样式*/
        .asset-gridview th {
            background-color: #4CAF50;
            color: white;
            text-align: left;
            padding: 10px;
            height: 40px;
        }

        .asset-gridview td {
            border: 1px solid #ddd;
            padding: 10px;
            text-align: left;
        }

        .asset-gridview tr:nth-child(even) {
            background-color: #f2f2f2;
        }

        .asset-gridview tr:hover {
            background-color: #ddd;
        }

        /* 上一页、下一页图片样式 */
        .asset-gridview a img {
            vertical-align: middle;
        }
        /*返回按钮*/
        .returnbutton {
            background: #fbca1f;
            font-family: inherit;
            padding: 0.6em 1.3em;
            font-weight: 900;
            font-size: 18px;
            border: 3px solid black;
            border-radius: 0.4em;
            box-shadow: 0.1em 0.1em;
            cursor: pointer;
        }

            .returnbutton:hover {
                transform: translate(-0.05em, -0.05em);
                box-shadow: 0.15em 0.15em;
            }

            .returnbutton:active {
                transform: translate(0.05em, 0.05em);
                box-shadow: 0.05em 0.05em;
            }
    </style>
</head>
<body>
    <form runat="server">
        <div id="one">
            <%--第一部分--%>
            <div id="logo">
                <img src="../Image/学校.png" alt="Alternate Text" class="menu-toggle" style="margin: 10px; width: 50px; height: 50px; float: left;" />
                <h3 style="margin-top: 22px; font-size: 20px; float: left;">高校资产管理系统</h3>
            </div>
            <div id="daohang" runat="server">
                <%--导航面板--%>

                <ul style="float: right; list-style-type: none; width: 400px;" runat="server">
                    <li></li>
                    <li style="margin-top: 6px;"><a href="../ChangePwd.aspx" class="Topstatus">修改密码</a></li>
                    <li style="margin-top: 6px;"><a href="../GetPwd.aspx" class="Topstatus">找回密码</a></li>
                    <li style="margin-top: 6px;"><a href="../MyUAMSWeb.aspx" class="Topstatus">退出登录</a></li>

                </ul>
            </div>
        </div>



        <hr align="left" size="3px" color="gray" width="920px" style="width: 100%;" />
        <%--状态栏--%>
        <div id="status">
            资产管理
        <asp:Label ID="lblProErr" runat="server"></asp:Label>
            <asp:Label ID="username" runat="server"></asp:Label>
        </div>


        <nav class="menus">
            <%--侧边栏--%>
            <ul>
                <li style="float: left; list-style: none; padding: 3px;">
                    <a href="../UserWork/MyWork.aspx" style="text-decoration: none;">我的业务</a>
                </li>
                <li style="float: left; list-style: none; padding: 3px;">
                    <a href="../UserWork/InsertAsset.aspx" style="text-decoration: none;">计入资产</a>
                </li>
                <li style="float: left; list-style: none; padding: 3px;">
                    <a href="../UserWork/AssetCategory.aspx">计入类别</a>

                </li>
                <li style="float: left; list-style: none; padding: 3px;">
                    <a href="../MaintenanceMgm/AllMaintenance.aspx">维修申请</a>

                </li>
                <li style="float: left; list-style: none; padding: 3px;">
                    <a href="../UserWork/UpdataAmount.aspx">库存管理</a>

                </li>
                <li style="float: left; list-style: none; padding: 3px;"></li>
            </ul>
        </nav>
        <div class="content" style="border-radius: 10px; position: absolute; top: 20%; left: 25%;">
            <%--主要内容--%>
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="LinqDataSource1" CssClass="asset-gridview" BackColor="White">
                <Columns>
                    <asp:BoundField DataField="Aid" HeaderText="资产编码" ReadOnly="True" SortExpression="Aid" />
                    <asp:BoundField DataField="Aname" HeaderText="资产名称" ReadOnly="True" SortExpression="Aname" />
                    <asp:BoundField DataField="Cperson" HeaderText="负责人" ReadOnly="True" SortExpression="Cperson" />
                    <asp:BoundField DataField="Telephone" HeaderText="电话" ReadOnly="True" SortExpression="Telephone" />
                    <asp:BoundField DataField="Department" HeaderText="负责部门" ReadOnly="True" SortExpression="Department" />
                    <asp:BoundField DataField="DTelephone" HeaderText="部门电话" ReadOnly="True" SortExpression="DTelephone" />
                    <asp:BoundField DataField="status" HeaderText="状态" ReadOnly="True" SortExpression="status" />
                    <asp:HyperLinkField DataNavigateUrlFields="Aid" DataNavigateUrlFormatString="~/MaintenanceMgm/MaintenanceForm.aspx?Aid={0}" DataTextFormatString="{c:0}" HeaderText="申请维修" Text="申请维修" />
                </Columns>

            </asp:GridView>
            <asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="MyUAMS.DAL.DataClasses1DataContext" EntityTypeName="" Select="new (Aid, Aname, Cperson, Telephone, Department, DTelephone, status)" TableName="Asset_Table" Where="Tid == @Tid">
                <WhereParameters>
                    <asp:Parameter DefaultValue="2" Name="Tid" Type="Int32" />
                </WhereParameters>
            </asp:LinqDataSource>
        </div>
        <asp:Button ID="return" runat="server" CssClass="returnbutton" Text="返回" OnClick="return_Click" />
    </form>
    <script src="Scripts/MyWork.js"></script>
    <script>
        // 获取侧边栏和图片按钮元素
        var sidebar = document.querySelector('.menus');
        var menuToggle = document.querySelector('.menu-toggle');

        // 为图片按钮添加点击事件
        menuToggle.addEventListener('click', function () {
            // 切换侧边栏的显示和隐藏
            var sidebarStyle = sidebar.style;
            if (sidebarStyle.left === '-200px') {
                sidebarStyle.left = '0';
            } else {
                sidebarStyle.left = '-200px';
            }
        });
    </script>
</body>
</html>
